package cn.edu.scau.cmi.zeyang.composite.safe;

import java.util.LinkedList;
import java.util.List;

public class SafeOrganization extends SafeMember{

	private List<SafeMember> list;

	public SafeOrganization(String name,SafeMember parent) {
		super(name,parent);
		list = new LinkedList<SafeMember>();
	}

	@Override
	public String work() {
		return name + "组织在工作";
	}

	public void addChild(SafeMember safeMember) {
		list.add(safeMember);
	}

	public void deleteAll() {
		list.clear();
	}

	public List<SafeMember> getChildren(){
		return list;
	}
}
